
#define CRLF chr(13) + chr(10)

//---------------------------------------------------------------------------//

function WQout( aParams )

    local cOut := ""

    if valtype( aParams ) == "A"
       AEval( aParams, { | c |  cOut :=  cOut + CRLF + cValToChar( c ) } )
       nMsgBox( cOut )
    endif

return nil

//----------------------------------------------------------------------------//

function cValToChar( uVal )

   local cType   := ValType( uVal )
   local cResult := ""

   do case
      case cType == "C"
           cResult = uVal

      case cType == "N"
           cResult = AllTrim( Str( uVal ) )

      case cType == "D"
           cResult = DToC( uVal )

      case cType == "L"
           cResult = If( uVal, ".T.", ".F." )
   endcase

return cResult

//----------------------------------------------------------------------------//

function uCharToVal( cValue, uType )

   local cType   := ValType( uType )
   local uResult

   do case
      case cType == "C"
           uResult = cValue

      case cType == "N"
           uResult = Val( cValue )

      case cType == "D"
           uResult = CToD( cValue )

      case cType == "L"
           uResult = ( cValue == ".T." )
   endcase

return uResult

